package com.codigosandroid.mobilegourmet;

import com.codigosandroid.mobilegourmet.R.id;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MenuOpcoes extends Activity implements OnClickListener {

	protected Button bt_ver_conta;
	protected Button bt_lancar_item;
	protected Button bt_fechar_menu;
	
	@Override
	protected void onCreate(Bundle savedInstanceState){
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu_opcoes);
		
		inicializar();
		listeners();
		
	}
	
	protected void inicializar(){
		
		bt_ver_conta = (Button) findViewById(R.id.bt_ver_conta);
		bt_lancar_item = (Button) findViewById(R.id.bt_lancar_item);
		bt_fechar_menu = (Button) findViewById(R.id.bt_fechar_menu);
		
	}
	
	protected void listeners(){
		
		bt_ver_conta.setOnClickListener(this);
		bt_lancar_item.setOnClickListener(this);
		bt_fechar_menu.setOnClickListener(this);
		
	}

	@Override
	public void onClick(View v) {
		
		switch(v.getId()){
		
		case id.bt_ver_conta:
			
			this.startActivity(new Intent(this, VerConta.class));
			this.finish();
			break;
		
		case id.bt_lancar_item:
			
			this.startActivity(new Intent(this, Pedido.class));
			this.finish();
			break;
			
		case id.bt_fechar_menu:
			
			this.startActivity(new Intent(this, Principal.class));
			this.finish();
			break;
		
		}
		
	}
	
}
